//
//  ZHTagModel.h
//
// Created by Basic on 15/1/12.
// Copyright (c) 2015 Basic. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "HHTagItemProtocol.h"
#import "HHTagListConfig.h"

NS_ASSUME_NONNULL_BEGIN

@interface HHTagButton: UIButton
///图片区域，默认nil
@property (nonatomic, strong, nullable) UIButton *imgBtn;
@property (nonatomic, strong, readonly, nullable) id<HHTagItemProtocol> tagModel;

/**
 初始化

 @param tag tag description
 @return return value description
 */
+ (instancetype)hh_allocWithTag: (id<HHTagItemProtocol> )tag;

/**
 根据配置 加载 button

 @param config config description
 */
- (void)hh_loadWithConfig:(HHTagListConfig *)config;

//MARK: - 计算size

/**
 根据tag text 和 tagList配置 来计算size
 
 @param text tag text
 @param config tagList 配置
 @return return value description
 */
+(CGSize )intrinsicContentSize:(NSString *)text withConfig:(HHTagListConfig *)config;

/**
 根据 tag数据模型 和 tagList配置 来计算size

 @param tagModel tag 数据
 @param config tagList 配置
 @return return value description
 */
+(CGSize )intrinsicContentSizeWithTag:(id<HHTagItemProtocol> )tagModel withConfig:(HHTagListConfig *)config;

@end


NS_ASSUME_NONNULL_END
